package twentytwentyone_3;

/**
 * @Author: Zahi
 * @Description:
 * @Date Created in 2021-03-24 10:10
 * @Modified By:
 */
public class FindLengthOfLCIS_674 {
    public static void main(String[] args){

    }

    public static int findLengthOfLCIS(int[] nums){
        if(nums.length == 0){
            return 0;
        }
        int result = 1;
        int count = 1;
        for (int i = 0; i < nums.length - 1; i++) {
            if (nums[i + 1] > nums[i]){
                count++;
            }else {
                if (count > result){
                    result = count;
                }
                count = 1;
            }
            if (count > result){
                result = count;
            }
        }
        return result;
    }
}
